package com.telecom.util;

import lombok.Data;
import lombok.Getter;

import java.util.HashMap;
import java.util.Map;
//封装数据源相关配置
@Data
public class DbProfile {
    private String driver;
    private String url;
    private String username;
    private String password;
    @Getter
    private Map<String, Mapper> mappers;
    public void setMappers(Map<String, Mapper> mappers) {
        /*if (mappers == null){
            this.mappers=new HashMap<>();
        }*/
        if (this.mappers == null){
            this.mappers=new HashMap<>();
        }
        this.mappers.putAll(mappers);
    }
}
